import request from "@/service";
import { ISystemUserListType, ISystemPageListType } from "./type";
import { IRequestType } from "@/service/type";
export function getUserList(params: any) {
  return request.post<IRequestType<ISystemUserListType>>({
    url: "/users/list",
    data: params
  });
}

export function getPageList(url: string, params: any) {
  return request.post<IRequestType<ISystemPageListType>>({
    url: url,
    data: params
  });
}

export function deleteRow(url: string) {
  return request.delete<IRequestType>({
    url: url
  });
}

export function newPageData(url: string, data: any) {
  return request.post<IRequestType>({
    url: url,
    data: data
  });
}

export function editPageData(url: string, data: any) {
  return request.patch<IRequestType>({
    url: url,
    data: data
  });
}
